package com.hsoft.zhxy.common.exception;

/**
 * All rights Reserved, Designed By 哈尔滨工业大学软件工程股份有限公司
 * 
 * @Title:       ErrorCodeInfoEnum
 * @Description: 公用描述枚举类
 * @author: menglingwei
 * @date: 2020年5月16日 下午1:05:07
 */
public enum ExcpCodeInfoEnum implements ExcpInfoInterface {

    // 默认错误码
    SUCCESS("200", "成功!"), 
    NOT_FOUND("404", "未找到该资源!"),
    INTERNAL_SERVER_ERROR("500", "服务器内部错误!"),
    SERVER_BUSY("503", "服务器正忙，请稍后再试!"),

    // 自定义错误码 参考：https://blog.csdn.net/Admin_ke/article/details/106947212
    USER_ERROR_A0122("A0122", "账户或密码错误"),
    USER_ERROR_A0130("A0130", "用户请求参数错误"),
    USER_ERROR_A0151("A0151", "参数校验失败"),
    USER_ERROR_A0201("A0201", "用户账户不存在"),
    USER_ERROR_A0230("A0230", "用户登录已过期"),
    USER_ERROR_A0301("A0301", "未授权"),
    USER_ERROR_A0311("A0311", "授权已过期"),
    USER_ERROR_A0320("A0320", "用户访问被拦截"),
    USER_ERROR_A0322("A0322", "账号状态异常"),
    USER_ERROR_A0500("A0500", "用户请求服务异常"),
    USER_ERROR_A0506("A0506", "用户重复请求"),
    USER_ERROR_A0701("A0701", "用户上传文件异常"),
    SYSTEM_ERROR_B0001("B0001", "系统执行出错"),
    SYSTEM_ERROR_B0100("B0100", "系统执行超时"),
    SERVICE_ERROR_C0001("C0001", "调用第三方服务出错"),
    SERVICE_ERROR_C0120("C0120", "消息服务出错"),
    SERVICE_ERROR_C0130("C0130", "缓存服务出错"),
    SERVICE_ERROR_C0200("C0200", "第三方系统执行超时"),
    SERVICE_ERROR_C0210("C0210", "RPC执行超时");

    /**
     * 错误码 
     */
    private String resultCode;

    /**
     * 错误描述
     */
    private String resultMsg;

    ExcpCodeInfoEnum(String resultCode, String resultMsg) {
        this.resultCode = resultCode;
        this.resultMsg = resultMsg;
    }

    @Override
    public String getResultCode() {
        return resultCode;
    }

    @Override
    public String getResultMsg() {
        return resultMsg;
    }

}